package com.study.model.mdao;

import java.math.BigInteger;
import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.study.model.pojo.ReciprocatingUnit;

@Mapper
public interface ReciprocatingUnitMapper {

	/**
	 * 查询表中所有数据
	 * 
	 * @return
	 */
	public List<ReciprocatingUnit> getAllInfo();

	/**
	 * 根据Id查询
	 * 
	 * @param recId
	 * @return
	 */
	public ReciprocatingUnit getInfoById(@Param("rec_id") String recId);

	/**
	 * 查询总条数
	 * 
	 * @return
	 */
	public int getCount();

	/**
	 * 分页查询
	 * 
	 * @param row
	 * @return
	 */
	public List<ReciprocatingUnit> getAllInfoPaging(int startPageNum, int everyPageNum);

	/**
	 * 关键字搜索
	 * 
	 * @param keywords
	 * @return
	 */
	List<ReciprocatingUnit> getRecByKeywords(@Param("keywords") String keywords);

	/**
	 * 新增一个来往单位
	 * 
	 * @param reciprocatingUnit
	 * @return
	 */
	int addNewRec(ReciprocatingUnit reciprocatingUnit);

	/**
	 * 修改来往单位
	 * 
	 * @param reciprocatingUnit
	 * @return
	 */
	int updataRec(ReciprocatingUnit reciprocatingUnit);
}
